<?php
class Q_Rule_Date extends Q_Rule_Abstract {

    /**
     * The parameters that were passed to this rule
     */
    protected $_params = array(
        'field' => 0, // default is zero because this allows $rule->validate('some text')
        'format' => 'MMDDYYYY',
    );
    
    public function isValid($value) {
    
        // this is temporary - later this needs to format based on format
        $len = strlen($this->getParam('format'));
        return ($len == strlen(get_digits($value)));
    
    }

}